<template>
    <div class="MyInformation">
        <van-nav-bar
            title="消息"
            right-text="清空"
            left-arrow
            @click-left="onClickLeft"
            @click-right="onClickRight"
            />
        <div class="content">
            <ul>
                <li>
                    <div class="left">
                        <div class="image">

                        </div>
                        <div class="dot">

                        </div>
                    </div>
                    <div class="rigth">
                        <div class="tit">
                            <span>平台消息</span>
                            <span>2018-04-04</span>
                        </div>
                        <div>
                            合适的话凤山街道会发生的美好斯蒂芬几十块和的撒个发送对方
                        </div>
                    </div>
                </li>
            </ul>    
        </div>    
       
    </div>
</template>
<script>
import { NavBar,Toast } from 'vant';
export default {
     name:"MyInformation",
    data() {
        return {
          
        }
    },
    created() {
        this.loadComments();
         // // 监听浏览器返回
        if (window.history && window.history.pushState) {
            history.pushState(null, null, document.URL);
            window.addEventListener('popstate', this.goBack, false);
        }
    },
    mounted(){
        this.myTaskInfo ();
        this.myPlatformMsg();
        this.myCarryMsg();    
    },
    destroyed(){
        // 销毁监听浏览器事件
        window.removeEventListener('popstate', this.goBack, false);
    },
    filters:{
        ProofcreateTime (createTime){
            if(!!createTime){
                return createTime.substring(0,10);
            }
            else{
                return '';
            } 
        }
    },
    methods: {
         onClickLeft() {
            Toast('返回');
            },
            onClickRight() {
            Toast('按钮');
            },
        //任务消息
        myTaskInfo (){
            this.$axios.post("/cct/information/taskMessage",{}).then(res =>{
                console.log("任务消息",res)
            })
        },
        //平台消息
        myPlatformMsg (){
                this.$axios.post("/cct/information/platformMessage",{}).then(res =>{
                    console.log("平台消息",res)
                })
        },
        //提现消息
            myCarryMsg (){
                this.$axios.post('/cct/information/withdrawMessage',{}).then(res =>{
                    console.log("提现消息",res)
                })
            },
        goBack(){
            this.$router.go(-1);
        }
    },
}
</script>
<style  scoped>
 .MyInformation{
    width:100%;
    font-size:0;
    padding:0.2rem;
    box-sizing:border-box;
 }
</style>